package com.sylli.oeuf.server.game.logic.invocation;

import com.sylli.oeuf.server.game.logic.BattleActor;
import com.sylli.oeuf.server.game.logic.CastingTarget;
import com.sylli.oeuf.server.game.logic.EventParameter;

public class AndInvocationCondition extends InvocationCondition {

	/**
	 * 
	 */
	private static final long serialVersionUID = 8028209854698453023L;
	
	private InvocationCondition ic;
	
	private InvocationCondition ic2;
	
	public AndInvocationCondition(InvocationCondition ic, InvocationCondition ic2) {
		this.ic = ic;
		this.ic2 = ic2;
	}

	@Override
	public boolean shouldInvoke(int rank, BattleActor caster,
			CastingTarget target, EventParameter param) {
		return ic.shouldInvoke(rank, caster, target, param)
			&  ic2.shouldInvoke(rank, caster, target, param);
	}

}
